package com.zang.blogz.model.output;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * 文章详情页返回对象
 *
 * @author 臧臧 on 2022/6/22
 */
@Data
@Builder
public class ArticleDetailsVO {

    @ApiModelProperty("文章缩略图")
    private String articleCover;

    @ApiModelProperty("标题")
    private String articleTitle;

    @ApiModelProperty("内容")
    private String articleContent;

    @ApiModelProperty("发表时间")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date createTime;

    @ApiModelProperty("文章作者")
    private String userName;

    @ApiModelProperty("访客数")
    private Long traffic;

    @ApiModelProperty("是否置顶")
    private Boolean isTop;

    @ApiModelProperty("点赞数")
    private Integer likeCount;

    @ApiModelProperty("推荐文章列表")
    private List<RecommendVO> recommendVoList;

    @ApiModelProperty("上一篇文章")
    private ArchiveVO lastArchive;

    @ApiModelProperty("下一篇文章")
    private ArchiveVO nextArchive;

    @ApiModelProperty("是否点过赞")
    private Boolean isLike;

    /**
     * 最新文章
     */
    private List<LatestArticleVO> latestArticle;
}